package org.example.ai.model.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 点赞记录表，用于存储用户对作品的点赞信息
 * </p>
 *
 * @author author
 * @since 2025-01-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("likes")
public class Likes implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 点赞记录ID，自增主键，用于唯一标识每条点赞记录
     */
    @TableId(value = "like_id", type = IdType.AUTO)
    private Integer likeId;

    /**
     * 用户ID，点赞的用户，关联users表的user_id
     */
    private Integer userId;

    /**
     * 作品ID，被点赞的作品，关联works表的work_id
     */
    private Integer workId;

    /**
     * 点赞时间，默认当前时间，记录用户点赞的具体时间
     */
    private LocalDateTime likeTime;


}
